package com.codes.service.impl;

import com.codes.dao.ProductMapper;
import com.codes.model.Product;
import com.codes.service.ProductSV;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Date 2020/5/28 17:05
 * @Created by peanut
 */
@Service
public class ProductImpl implements ProductSV {

    @Autowired
    private ProductMapper productMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return productMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Product record) {
        return 0;
    }

    @Override
    public int insertSelective(Product record) {
        return 0;
    }

    @Override
    public Product selectByPrimaryKey(Integer id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(Map map) {
        return productMapper.updateByPrimaryKeySelective(map);
    }

    @Override
    public int updateByPrimaryKey(Product record) {
        return 0;
    }

    @Override
    public List<Map<String, Object>> getAllProduct(Map map) {
        return productMapper.getAllProduct(  map);
    }

    @Override
    public int insertMap(Map map) {
        return productMapper.insertMap(map);
    }
}